Technical Q&A QA1023
The installer turns my application into a folder.


Q: Why does a Java application created with MRJAppBuilder installed with Apple's Installer become a folder?

A: The MRJAppBuilder application that shiped with Mac OS X 10.0 is failing to create a text file that is needed by the PackageMaker application, and the Apple Installer. To fix an application that has already been created by MRJAppBuilder create an eight character file with no line feeds or carriage returns. The first four characters of the file being "APPL" for an application type. The second four characters of the file need to be the creator code, which in MRJAppBuilder defaults to "????". This file needs to be named "PkgInfo" and placed in the Contents folder of the application bundle. The PkgInfo file can be created with most text editors and command line tools.

TextEdit can be used to create the PkgInfo file. Since the default format for TextEdit is the rtf (Rich Text Format) the file will need to be first converted to Text Format using TextEdit's menu item "Make Plain Text" under the Format menu. The file will also need to have the .txt extension removed from its name after it is saved.

To place the PkgInfo file in the Contents folder of the applications bundle Ctrl-Click on the Application and select the contextual menu item "Show Package Contents". This will open a window that contains a folder named Contents. Move the PkgInfo file into the Contents folder.

Once the PkgInfo file has been properly created and placed in the correct location in the application bundle it can be packaged up with PackageMaker and successfully installed with the Apple Installer.

For more information about creator codes and registering an application see:

http://developer.apple.com/dev/cftype/index.html


[Apr 12 2001]


Developer Documentation | Technical Notes | Development Kits | Sample Code